<!DOCTYPE html>
<html lang="en">

<!-- Head tag -->
<head><meta name="generator" content="Hexo 3.9.0">
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="baidu-site-verification" content="Xijgc2YO5y">
	<meta name="baidu-site-verification" content="Qj80ZohAkr">
	<meta name="google-site-verification" content="N-bPfRy2yUxAuOVKpn0Gm7BOygzI_faxwpAUQq0T8xw">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="Leeves在 Github 上的个人博客">
    <meta name="keyword" content="Leeves">
    <meta name="theme-color" content="#600090">
    <meta name="msapplication-navbutton-color" content="#600090">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="#600090">
    <link rel="shortcut icon" href="https://cdn4.iconfinder.com/data/icons/ionicons/512/icon-person-128.png">
    <link rel="alternate" type="application/atom+xml" title="Leeves" href="/atom.xml">
    <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css">
    <link rel="stylesheet" href="//cdn.bootcss.com/font-awesome/4.6.3/css/font-awesome.css">
    <title>
        
        spring-boot-web-service之ws（一）｜Leeves&#39;s blog
        
    </title>

    <link rel="canonical" href="https://leevsee.github.io/2018/07/18/spring-boot-web-service之ws（一）/">

    <!-- Bootstrap Core CSS -->
    <link rel="stylesheet" href="/css/bootstrap.min.css">

    <!-- Custom CSS -->
    <link rel="stylesheet" href="/css/blog-style.css">

    <!-- Pygments Github CSS -->
    <link rel="stylesheet" href="/css/syntax.css">
	<script>
(function(){
    var bp = document.createElement('script');
    var curProtocol = window.location.protocol.split(':')[0];
    if (curProtocol === 'https') {
        bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';        
    }
    else {
        bp.src = 'http://push.zhanzhang.baidu.com/push.js';
    }
    var s = document.getElementsByTagName("script")[0];
    s.parentNode.insertBefore(bp, s);
})();
</script>
</head>

<style>

    header.intro-header {
        background-image: url('http://cdn.pcbeta.attachment.inimc.com/data/attachment/forum/201205/15/232126llvvucjetunjn8g2.jpg')
    }
</style>
<!-- hack iOS CSS :active style -->
<body ontouchstart="" class="animated fadeIn">
<!-- Navigation -->
<nav class="navbar navbar-default navbar-custom navbar-fixed-top " id="nav-top" data-ispost = "true" data-istags="false
" data-ishome = "false" >
    <div class="container-fluid">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header page-scroll">
            <button type="button" class="navbar-toggle">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand animated pulse" href="/">
                <span class="brand-logo">
                    Leeves
                </span>
                's Blog
            </a>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <!-- Known Issue, found by Hux:
            <nav>'s height woule be hold on by its content.
            so, when navbar scale out, the <nav> will cover tags.
            also mask any touch event of tags, unfortunately.
        -->
        <!-- /.navbar-collapse -->
        <div id="huxblog_navbar">
            <div class="navbar-collapse">
                <ul class="nav navbar-nav navbar-right">
                    <li>
                        <a href="/">Home</a>
                    </li>

                    
                        
                    
                        
                        <li>
                            <a href="/Others/">Others</a>
                        </li>
                        
                    

                </ul>
            </div>
        </div>
    </div>
    <!-- /.container -->
</nav>
<script>
    // Drop Bootstarp low-performance Navbar
    // Use customize navbar with high-quality material design animation
    // in high-perf jank-free CSS3 implementation
//    var $body   = document.body;
    var $toggle = document.querySelector('.navbar-toggle');
    var $navbar = document.querySelector('#huxblog_navbar');
    var $collapse = document.querySelector('.navbar-collapse');

    $toggle.addEventListener('click', handleMagic)
    function handleMagic(e){
        if ($navbar.className.indexOf('in') > 0) {
        // CLOSE
            $navbar.className = " ";
            // wait until animation end.
            setTimeout(function(){
                // prevent frequently toggle
                if($navbar.className.indexOf('in') < 0) {
                    $collapse.style.height = "0px"
                }
            },400)
        }else{
        // OPEN
            $collapse.style.height = "auto"
            $navbar.className += " in";
        }
    }
</script>

<!-- Main Content -->

<!--only post-->


<img class="wechat-title-img"
     src="http://lixin.piaozu.com.cn/postPicture.jpg">


<style>
    
    header.intro-header {
        background-image: url('http://lixin.piaozu.com.cn/postPicture.jpg')
    }

    
</style>

<header class="intro-header">
    <div class="container">
        <div class="row">
            <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1 text-center">
                <div class="post-heading">
                    <h1>spring-boot-web-service之ws（一）</h1>
                    
                    <span class="meta">
                         作者 Leeves
                        <span>
                          日期 2018-07-18
                         </span>
                    </span>
                    <div class="tags text-center">
                        
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="post-title-haojen">
        <span>
            spring-boot-web-service之ws（一）
        </span>
    </div>
</header>

<!-- Post Content -->
<article>
    <div class="container">
        <div class="row">
            <!-- Post Container -->
            <div class="col-lg-8 col-lg-offset-1 col-sm-9 post-container">
                <p>题外话：ε=(´ο｀*)))日渐消瘦，现在感觉写博客的心情也少了些。嘛，最近看了个视频深有感触。是时候记录一下自己的时间，从而才能够更好的自觉。<br>背景：<br>    目前web service有两类实现：<br>    一：jws+cxf<br>    二：通过spring ws来实现<br>其实，想先来一篇jws+cxf。但是spring ws相对复杂些，那就先上复杂的好了，就是那么任性╮(╯▽╰)╭<br>吐槽一下，百度上面的，全是官方文档的例子。类名和operation方法都是一模一样。很多时间不能满足业务需求。本篇除了会有官方的例子，还会有自定义的web serivce。</p>
<h2 id="1-添加依赖"><a href="#1-添加依赖" class="headerlink" title="1.添加依赖"></a>1.添加依赖</h2><figure class="highlight plain"><table><tr><td class="code"><pre><span class="line"></span><br><span class="line">&lt;dependency&gt;</span><br><span class="line">	&lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;</span><br><span class="line">	&lt;artifactId&gt;spring-boot-starter-web-services&lt;/artifactId&gt;</span><br><span class="line">&lt;/dependency&gt;</span><br><span class="line">&lt;dependency&gt;</span><br><span class="line">	&lt;groupId&gt;wsdl4j&lt;/groupId&gt;</span><br><span class="line">	&lt;artifactId&gt;wsdl4j&lt;/artifactId&gt;</span><br><span class="line">&lt;/dependency&gt;</span><br></pre></td></tr></table></figure>
<h2 id="2-创建XML-Schema文件"><a href="#2-创建XML-Schema文件" class="headerlink" title="2.创建XML Schema文件"></a>2.创建XML Schema文件</h2><p>用于生成wsdl</p>
<figure class="highlight plain"><table><tr><td class="code"><pre><span class="line">&lt;xs:schema xmlns:xs=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns:tns=&quot;http://webservice.leeves.com/ws&quot;</span><br><span class="line">           targetNamespace=&quot;http://webservice.leeves.com/ws&quot; elementFormDefault=&quot;qualified&quot;&gt;</span><br><span class="line"></span><br><span class="line">    &lt;xs:element name=&quot;leevesServiceRequest&quot;&gt;</span><br><span class="line">        &lt;xs:complexType&gt;</span><br><span class="line">            &lt;xs:sequence&gt;</span><br><span class="line">                &lt;xs:element name=&quot;reqMsg&quot; type=&quot;xs:string&quot;/&gt;</span><br><span class="line">            &lt;/xs:sequence&gt;</span><br><span class="line">        &lt;/xs:complexType&gt;</span><br><span class="line">    &lt;/xs:element&gt;</span><br><span class="line"></span><br><span class="line">    &lt;xs:element name=&quot;leevesServiceResponse&quot;&gt;</span><br><span class="line">        &lt;xs:complexType&gt;</span><br><span class="line">            &lt;xs:sequence&gt;</span><br><span class="line">                &lt;xs:element name=&quot;resMsg&quot; type=&quot;xs:string&quot;/&gt;</span><br><span class="line">            &lt;/xs:sequence&gt;</span><br><span class="line">        &lt;/xs:complexType&gt;</span><br><span class="line">    &lt;/xs:element&gt;</span><br><span class="line"></span><br><span class="line">&lt;/xs:schema&gt;</span><br></pre></td></tr></table></figure>
<h2 id="3-创建配置类"><a href="#3-创建配置类" class="headerlink" title="3.创建配置类"></a>3.创建配置类</h2><p>生成接收返回Request和Response类<br>我是使用idea，选中Schema右键生产<br><img src="http://lixin.piaozu.com.cn/wsservicejaxb.png" alt="enter description here"><br>具体类如下：<br><img src="http://lixin.piaozu.com.cn/wsserviceleevesService.png" alt="enter description here"></p>
<h2 id="4-创建配置类"><a href="#4-创建配置类" class="headerlink" title="4.创建配置类"></a>4.创建配置类</h2><p>获取XsdSchema实例，并转换成wsdl</p>
<figure class="highlight plain"><table><tr><td class="code"><pre><span class="line"></span><br><span class="line">@EnableWs</span><br><span class="line">@Configuration</span><br><span class="line">public class WebServiceConfig extends WsConfigurerAdapter &#123;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * 把XSD schemas转换成wsdl</span><br><span class="line">     */</span><br><span class="line">    @Bean(name = &quot;leevesService&quot;)</span><br><span class="line">    public DefaultWsdl11Definition defaultWsdl11Definition(XsdSchema leevesServiceSchema) &#123;</span><br><span class="line">        DefaultWsdl11Definition wsdl11Definition = new DefaultWsdl11Definition();</span><br><span class="line">        wsdl11Definition.setPortTypeName(&quot;LeevesService&quot;);</span><br><span class="line">        wsdl11Definition.setLocationUri(&quot;/ws&quot;);</span><br><span class="line">        wsdl11Definition.setTargetNamespace(&quot;http://webservice.leeves.com/ws&quot;);</span><br><span class="line">        wsdl11Definition.setSchema(leevesServiceSchema);</span><br><span class="line">        return wsdl11Definition;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * 创建leeves的XsdSchema实例</span><br><span class="line">     */</span><br><span class="line">    @Bean</span><br><span class="line">    public XsdSchema leevesServiceSchema() &#123;</span><br><span class="line">        return new SimpleXsdSchema(new ClassPathResource(&quot;schema/leevesService.xsd&quot;));</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h2 id="5-发布webservice端口"><a href="#5-发布webservice端口" class="headerlink" title="5.发布webservice端口"></a>5.发布webservice端口</h2><figure class="highlight plain"><table><tr><td class="code"><pre><span class="line"></span><br><span class="line">@Endpoint</span><br><span class="line">public class WebServiceEndpoint &#123;</span><br><span class="line"></span><br><span class="line">    private static final String NAMESPACE_URI = &quot;http://webservice.leeves.com/ws&quot;;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * 处理web service请求</span><br><span class="line">     * 其中localPart是input的节点</span><br><span class="line">     */</span><br><span class="line">    @PayloadRoot(namespace = NAMESPACE_URI, localPart = &quot;leevesServiceRequest&quot;)</span><br><span class="line">    @ResponsePayload</span><br><span class="line">    public LeevesServiceResponse getReqMsg(@RequestPayload LeevesServiceRequest leevesServiceRequest) &#123;</span><br><span class="line">        String reqMsg = leevesServiceRequest.getReqMsg();</span><br><span class="line">        System.out.println(&quot;----LeevesService服务端接收到----：&quot; + reqMsg);</span><br><span class="line">        LeevesServiceResponse leevesServiceResponse = new LeevesServiceResponse();</span><br><span class="line">        leevesServiceResponse.setResMsg(&quot;LeevesService服务端收到：&quot; + reqMsg + &quot;！向客户端发送数据：我是LeevesService&quot;);</span><br><span class="line">        return leevesServiceResponse;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<ul>
<li><h2 id="使用soapui测试"><a href="#使用soapui测试" class="headerlink" title="使用soapui测试"></a>使用soapui测试</h2></li>
</ul>
<p>添加soap地址：<br><img src="http://lixin.piaozu.com.cn/wsservicesoapui.png" alt="enter description here"></p>
<p>发起请求：<br><img src="http://lixin.piaozu.com.cn/wsservicesoapui_leeves.png" alt="enter description here"></p>
<p>后台：<br><img src="http://lixin.piaozu.com.cn/wsserviceleevesService%E6%8E%A5%E5%8F%97.png" alt="enter description here"></p>
<hr>
<hr>
<hr>
<p>以上就是正常的一个使用spring ws创建服务端的例子。在spring ws中入参和出参均以Request和Response结尾。<br><img src="http://lixin.piaozu.com.cn/wsserviceleevesService_xsd.png" alt="enter description here"></p>
<p>那么问题来了，有些webservice的不以Request和Response结尾。肿么办？？？？  </p>
<p>这时候你就需要自定义wsdl了。</p>
<p>下面我们先看看最终效果：<br>这是上面的做的leeveSerivce：<br><img src="http://lixin.piaozu.com.cn/wsserviceleevesService_wsdl.png" alt="enter description here"><br>这是不以Request结尾的testSerice：<br><img src="http://lixin.piaozu.com.cn/wsservicetestService_wsdl.png" alt="enter description here"></p>
<p>那么怎么要来做呢？</p>
<h2 id="1-重写MessagesProvider和PortTypesProvider"><a href="#1-重写MessagesProvider和PortTypesProvider" class="headerlink" title="1.重写MessagesProvider和PortTypesProvider"></a>1.重写MessagesProvider和PortTypesProvider</h2><p>下面是需要修改的地方</p>
<figure class="highlight plain"><table><tr><td class="code"><pre><span class="line"></span><br><span class="line">public class MySuffixBasedMessagesProvider extends DefaultMessagesProvider &#123;</span><br><span class="line"></span><br><span class="line">	//其他代码省略</span><br><span class="line">	</span><br><span class="line">    /** 自定义后缀 */</span><br><span class="line">    private String customSuffixStr = &quot;Service&quot;;</span><br><span class="line">	</span><br><span class="line">	/**</span><br><span class="line">     * 判断自定义后缀是element元素</span><br><span class="line">     */</span><br><span class="line">    @Override</span><br><span class="line">    protected boolean isMessageElement(Element element) &#123;</span><br><span class="line">        if (super.isMessageElement(element)) &#123;</span><br><span class="line">            String elementName = getElementName(element);</span><br><span class="line">            Assert.hasText(elementName, &quot;Element has no name&quot;);</span><br><span class="line">            return elementName.endsWith(getRequestSuffix()) || elementName.endsWith(getResponseSuffix()) ||</span><br><span class="line">                    elementName.endsWith(getFaultSuffix()) || elementName.endsWith(getCustomSuffixStr());</span><br><span class="line">        &#125;</span><br><span class="line">        else &#123;</span><br><span class="line">            return false;</span><br><span class="line">        &#125;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">	//其他代码省略</span><br><span class="line"></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<figure class="highlight plain"><table><tr><td class="code"><pre><span class="line"></span><br><span class="line">public class MySuffixBasedPortTypesProvider extends AbstractPortTypesProvider &#123;</span><br><span class="line"></span><br><span class="line">	//其他代码省略</span><br><span class="line">	</span><br><span class="line">    /** 自定义后缀 */</span><br><span class="line">    private String customSuffixStr = &quot;Service&quot;;</span><br><span class="line">	</span><br><span class="line">    /**</span><br><span class="line">     * 添加自定义后缀到OperationName</span><br><span class="line">     */</span><br><span class="line">    @Override</span><br><span class="line">    protected String getOperationName(Message message) &#123;</span><br><span class="line">        String messageName = getMessageName(message);</span><br><span class="line">        if (messageName != null) &#123;</span><br><span class="line">            if (messageName.endsWith(getCustomSuffixStr())) &#123;</span><br><span class="line">                return messageName;</span><br><span class="line">            &#125; else if (messageName.endsWith(getRequestSuffix())) &#123;</span><br><span class="line">                return messageName.substring(0, messageName.length() - getRequestSuffix().length());</span><br><span class="line">            &#125; else if (messageName.endsWith(getResponseSuffix())) &#123;</span><br><span class="line">                return messageName.substring(0, messageName.length() - getResponseSuffix().length());</span><br><span class="line">            &#125; else if (messageName.endsWith(getFaultSuffix())) &#123;</span><br><span class="line">                return messageName.substring(0, messageName.length() - getFaultSuffix().length());</span><br><span class="line">            &#125;</span><br><span class="line">        &#125;</span><br><span class="line">        return null;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">	//其他代码省略</span><br><span class="line"></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h2 id="2-自定义Wsdl11Definition"><a href="#2-自定义Wsdl11Definition" class="headerlink" title="2.自定义Wsdl11Definition"></a>2.自定义Wsdl11Definition</h2><p>把上面重写的MessagesProvider和PortTypesProvider，放到Wsdl11Definition类中</p>
<figure class="highlight plain"><table><tr><td class="code"><pre><span class="line"></span><br><span class="line">public class MyWsdl11Definition  implements Wsdl11Definition, InitializingBean &#123;</span><br><span class="line"></span><br><span class="line">	//其他代码省略</span><br><span class="line">	</span><br><span class="line">    /** 添加定义MessagesProvider */</span><br><span class="line">    private final MySuffixBasedMessagesProvider messagesProvider = new MySuffixBasedMessagesProvider();</span><br><span class="line">    /** 添加定义PortTypesProvider */</span><br><span class="line">    private final MySuffixBasedPortTypesProvider portTypesProvider = new MySuffixBasedPortTypesProvider();</span><br><span class="line">	</span><br><span class="line">	//其他代码省略</span><br><span class="line"></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h2 id="3-web-service-配置"><a href="#3-web-service-配置" class="headerlink" title="3.web service 配置"></a>3.web service 配置</h2><figure class="highlight plain"><table><tr><td class="code"><pre><span class="line"></span><br><span class="line">@EnableWs</span><br><span class="line">@Configuration</span><br><span class="line">public class WebServiceConfig extends WsConfigurerAdapter &#123;</span><br><span class="line"></span><br><span class="line">    /**</span><br><span class="line">     * 把XSD schemas转换成wsdl</span><br><span class="line">     */</span><br><span class="line">    @Bean(name = &quot;testService&quot;)</span><br><span class="line">    public MyWsdl11Definition mMyWsdl11Definition(XsdSchema testServiceSchema) &#123;</span><br><span class="line">        MyWsdl11Definition wsdl11Definition = new MyWsdl11Definition();</span><br><span class="line">        wsdl11Definition.setPortTypeName(&quot;TestService&quot;);</span><br><span class="line">        wsdl11Definition.setLocationUri(&quot;/ws&quot;);</span><br><span class="line">        wsdl11Definition.setTargetNamespace(&quot;http://webservice.leeves.com/ws&quot;);</span><br><span class="line">        wsdl11Definition.setSchema(testServiceSchema);</span><br><span class="line">        return wsdl11Definition;</span><br><span class="line">    &#125;</span><br><span class="line">	</span><br><span class="line">    /**</span><br><span class="line">     * 创建test的XsdSchema实例</span><br><span class="line">     */</span><br><span class="line">    @Bean</span><br><span class="line">    public XsdSchema testServiceSchema() &#123;</span><br><span class="line">        return new SimpleXsdSchema(new ClassPathResource(&quot;schema/testService.xsd&quot;));</span><br><span class="line">    &#125;	</span><br><span class="line"></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<ul>
<li><h2 id="使用soapui测试-1"><a href="#使用soapui测试-1" class="headerlink" title="使用soapui测试"></a>使用soapui测试</h2>完美通过，^.^，下次再带来spring boot ws client客户端<br><img src="http://lixin.piaozu.com.cn/wsservicetestService_soapui.png" alt="enter description here"></li>
</ul>
<p>忘了忘了，补上代码地址：<a href="https://github.com/leevsee/ws-new-demo" target="_blank" rel="noopener">https://github.com/leevsee/ws-new-demo</a></p>

                <hr>
                
                <!-- 多说 Share start -->
                <div class="ds-share"
                     style="text-align: right"
                     data-thread-key="2018/07/18/spring-boot-web-service之ws（一）/"
                     data-title="spring-boot-web-service之ws（一）"
                     data-url="https://leevsee.github.io/2018/07/18/spring-boot-web-service之ws（一）/"
                     data-images=""
                     data-content="题外话：ε=(´ο｀*)))日渐消瘦，现在感觉写博客的心情也少了些。嘛，最近看了个视频深有感触... | Leeves&#39;s blog ">
                    <div class="ds-share-inline">
                        <ul class="ds-share-icons-16">
                            <li data-toggle="ds-share-icons-more"><a class="ds-more" href="#">分享到：</a></li>
                            <li><a class="ds-wechat flat" href="javascript:void(0);" data-service="wechat">微信</a></li>
                            <li><a class="ds-weibo flat" href="javascript:void(0);" data-service="weibo">微博</a></li>
                            <li><a class="ds-douban flat" href="javascript:void(0);" data-service="douban">豆瓣</a></li>
                        </ul>
                        <div class="ds-share-icons-more">
                        </div>
                    </div>
                    <hr>
                </div>
                <!-- 多说 Share end-->
                

                <ul class="pager">
                    
                    <li class="previous">
                        <a href="/2018/07/20/spring-boot-web-service之jws-cxf（二）/" data-toggle="tooltip" data-placement="top"
                           title="spring-boot-web-service之jws+cxf（二）">&larr; Previous Post</a>
                    </li>
                    
                    
                    <li class="next">
                        <a href="/2017/05/19/Kotlin入门学习笔记（一）/" data-toggle="tooltip" data-placement="top"
                           title="Kotlin入门学习笔记（一）">Next Post &rarr;</a>
                    </li>
                    
                </ul>

                
                <!-- 多说评论框 start -->
                <div class="comment">
                    <div class="ds-thread"
                         data-thread-key="2018/07/18/spring-boot-web-service之ws（一）/"
                         data-title="spring-boot-web-service之ws（一）"
                         data-url="https://leevsee.github.io/2018/07/18/spring-boot-web-service之ws（一）/">
                    </div>
                </div>
                <!-- 多说评论框 end -->
                

                

            </div>

            <div class="hidden-xs col-sm-3 toc-col">
                <div class="toc-wrap">
                    <ol class="toc"><li class="toc-item toc-level-2"><a class="toc-link" href="#1-添加依赖"><span class="toc-text">1.添加依赖</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#2-创建XML-Schema文件"><span class="toc-text">2.创建XML Schema文件</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#3-创建配置类"><span class="toc-text">3.创建配置类</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#4-创建配置类"><span class="toc-text">4.创建配置类</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#5-发布webservice端口"><span class="toc-text">5.发布webservice端口</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#使用soapui测试"><span class="toc-text">使用soapui测试</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#1-重写MessagesProvider和PortTypesProvider"><span class="toc-text">1.重写MessagesProvider和PortTypesProvider</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#2-自定义Wsdl11Definition"><span class="toc-text">2.自定义Wsdl11Definition</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#3-web-service-配置"><span class="toc-text">3.web service 配置</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#使用soapui测试-1"><span class="toc-text">使用soapui测试</span></a></li></ol>
                </div>
            </div>
        </div>

        <div class="row">
            <!-- Sidebar Container -->

            <div class="
                col-lg-8 col-lg-offset-2
                col-md-10 col-md-offset-1
                sidebar-container">

                <!-- Featured Tags -->
                
                <section>
                    <!-- no hr -->
                    <h5 class="text-center">
                        <a href="/tags/">FEATURED TAGS</a>
                    </h5>
                    <div class="tags">
                        
                    </div>
                </section>
                

                <!-- Friends Blog -->
                
                <div style="margin-top: 20px;">
                    <h5 class="text-center">FRIENDS</h5>
                    <ul class="list-inline text-center">
                        
                        <li><a href="https://leevsee.github.io/#">lixin</a></li>
                        
                    </ul>
                </div>
                
            </div>
        </div>

    </div>
</article>


<!-- 多说公共JS代码 start (一个网页只需插入一次) -->
<script type="text/javascript">
    // dynamic User by Hux
    var _user = 'leeves';

    // duoshuo comment query.
    var duoshuoQuery = {short_name: _user};
    (function () {
        var ds = document.createElement('script');
        ds.type = 'text/javascript';
        ds.async = true;
        ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js';
        ds.charset = 'UTF-8';
        (document.getElementsByTagName('head')[0]
        || document.getElementsByTagName('body')[0]).appendChild(ds);
    })();
</script>
<!-- 多说公共JS代码 end -->





<!-- Footer -->
<!-- Footer -->
<footer>
    <div class="container">
        <div class="row">
            <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1 text-center">
                <br>
                <ul class="list-inline text-center">
                
                
                    <li>
                        <a target="_blank" href="https://twitter.com/lxsweety">
                            <span class="fa-stack fa-lg">
                                <i class="fa fa-circle fa-stack-2x"></i>
                                <i class="fa fa-twitter fa-stack-1x fa-inverse"></i>
                            </span>
                        </a>
                    </li>
                
                

                

                
                    <li>
                        <a target="_blank" href="https://www.facebook.com/lxsweety">
                            <span class="fa-stack fa-lg">
                                <i class="fa fa-circle fa-stack-2x"></i>
                                <i class="fa fa-facebook fa-stack-1x fa-inverse"></i>
                            </span>
                        </a>
                    </li>
                

                
                    <li>
                        <a target="_blank"  href="https://github.com/Leevsee">
                            <span class="fa-stack fa-lg">
                                <i class="fa fa-circle fa-stack-2x"></i>
                                <i class="fa fa-github fa-stack-1x fa-inverse"></i>
                            </span>
                        </a>
                    </li>
                

                

                </ul>
                <p class="copyright text-muted">
                    Copyright &copy; Leeves 2019
                    <br>
                    <span id="busuanzi_container_site_pv" style="font-size: 12px;">PV: <span id="busuanzi_value_site_pv"></span> Times</span>
                    <br>
                    Theme by <a href="http://kaijun.rocks/hexo-theme-huxblog/" style=" color:#666; font-size:8px;">Kaijun</a>
                </p>

            </div>
        </div>
    </div>
</footer>

<!-- jQuery -->
<script src="/js/jquery.min.js"></script>

<!-- Bootstrap Core JavaScript -->
<script src="/js/bootstrap.min.js"></script>

<!-- Custom Theme JavaScript -->
<script src="/js/blog.js"></script>

<!-- async load function -->
<script>
    function async(u, c) {
      var d = document, t = 'script',
          o = d.createElement(t),
          s = d.getElementsByTagName(t)[0];
      o.src = u;
      if (c) { o.addEventListener('load', function (e) { c(null, e); }, false); }
      s.parentNode.insertBefore(o, s);
    }
</script>

<!-- jquery.tagcloud.js -->
<script>
    // only load tagcloud.js in tag.html
    if($('#tag_cloud').length !== 0){
        async("https://leevsee.github.io/js/jquery.tagcloud.js",function(){
            $.fn.tagcloud.defaults = {
                //size: {start: 1, end: 1, unit: 'em'},
                color: {start: '#bbbbee', end: '#0085a1'},
            };
            $('#tag_cloud a').tagcloud();
        })
    }
</script>

<!--fastClick.js -->
<script>
    async("//cdn.bootcss.com/fastclick/1.0.6/fastclick.min.js", function(){
        var $nav = document.querySelector("nav");
        if($nav) FastClick.attach($nav);
    })
</script>

<!-- Google Analytics -->



<!-- Baidu Tongji -->


<!-- swiftype -->
<script type="text/javascript">
  (function(w,d,t,u,n,s,e){w['SwiftypeObject']=n;w[n]=w[n]||function(){
  (w[n].q=w[n].q||[]).push(arguments);};s=d.createElement(t);
  e=d.getElementsByTagName(t)[0];s.async=1;s.src=u;e.parentNode.insertBefore(s,e);
  })(window,document,'script','//s.swiftypecdn.com/install/v2/st.js','_st');

  _st('install','null','2.0.0');
</script>

<script async src="//dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"></script>

<!--wechat title img-->
<img class="wechat-title-img" src="http://lixin.piaozu.com.cn/icon1.jpg">
</body>

</html>
